import request from '@/utils/request'
// 查询列表
export const getPermissiontListApi = (params) => {
  return request({
    url: '/sys/permission',
    method: 'get',
    params
  })
}

// 查询单个
export const getPermissiontInfoApi = (id) => {
  return request({
    url: '/sys/permission/' + id,
    method: 'get'
  })
}

// 添加
export const addPermissiontApi = (data) => {
  return request({
    url: '/sys/permission',
    method: 'post',
    data
  })
}

// 修改
export const editPermissiontApi = (data) => {
  return request({
    url: '/sys/permission/' + data.id,
    method: 'put',
    data
  })
}

// 删除
export const delPermissiontApi = (id) => {
  return request({
    url: '/sys/permission/' + id,
    method: 'delete'
  })
}
